Skip to content

Enforce TypeScript type-checking for tests in validation and CI#113

Merged
esgn merged 2 commits into
masterfrom
108-typecheck-test
May 5, 2026
Merged

Enforce TypeScript type-checking for tests in validation and CI#113
esgn merged 2 commits into
masterfrom
108-typecheck-test

Conversation

@esgn
Copy link
Copy Markdown
Member

@esgn esgn commented May 5, 2026

Closes #108

This PR enforces TypeScript type-checking for the test suite as part of the standard validation flow.

It keeps application and test type-checking as separate commands (typecheck and typecheck:test), adds test type-checking to verify:fast, and updates CI/release workflows to run that validation path. It also extends tsconfig.test.json to cover both test/**/* and the Vitest config files, so test code and test tooling are checked earlier and more consistently during refactors.

@esgn esgn requested a review from mborne May 5, 2026 09:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens the repo’s validation pipeline by ensuring TypeScript type-checking also covers the test suite, and by making CI/release workflows run the same fast verification path. It also aligns Vitest runtime behavior with explicit imports by disabling global test APIs.

Changes:

  • Add a dedicated typecheck:test command and run it as part of verify:fast, and update CI/release workflows to use verify:fast.
  • Expand tsconfig.test.json scope to type-check Vitest config files as well as test/**/*.
  • Disable globals in Vitest configs and update tests/helpers to import describe/it/expect/vi explicitly.

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vitest.integration.config.mts Disable Vitest globals for integration tests.
vitest.e2e.config.mts Disable Vitest globals for E2E tests.
vitest.config.mts Disable Vitest globals for unit tests.
tsconfig.test.json Include Vitest config files in the test type-check scope.
test/tools/wfs/searchTypes.test.ts Import Vitest APIs explicitly.
test/tools/wfs/getFeatures.test.ts Consolidate Vitest imports (incl. vi) for globals-off mode.
test/tools/wfs/getFeatureById.test.ts Consolidate Vitest imports (incl. vi) for globals-off mode.
test/tools/wfs/describeType.test.ts Import Vitest APIs explicitly.
test/tools/urbanisme.test.ts Import Vitest APIs explicitly.
test/tools/strict-input.test.ts Import Vitest APIs explicitly.
test/tools/geocode.test.ts Import Vitest APIs explicitly.
test/tools/cadastre.test.ts Import Vitest APIs explicitly.
test/tools/base-tool-error.test.ts Import Vitest APIs explicitly.
test/tools/altitude.test.ts Import Vitest APIs explicitly.
test/tools/adminexpress.test.ts Import Vitest APIs explicitly.
test/integration/helpers/level1-assertions.ts Adjust assertions to satisfy TS under stricter checking.
test/helpers/wfs_engine/spatialFilter.test.ts Import Vitest APIs explicitly.
test/helpers/wfs_engine/spatialCql.test.ts Import Vitest APIs explicitly.
test/helpers/wfs_engine/response.test.ts Import Vitest APIs explicitly.
test/helpers/wfs_engine/request.test.ts Import Vitest APIs explicitly.
test/helpers/wfs_engine/queryPreparation.test.ts Import Vitest APIs explicitly.
test/helpers/wfs_engine/geometry.test.ts Import Vitest APIs explicitly.
test/helpers/wfs_engine/execution.test.ts Import Vitest APIs explicitly (incl. hooks).
test/helpers/toolError.test.ts Consolidate Vitest imports (incl. vi) for globals-off mode.
test/helpers/http.test.ts Import Vitest APIs explicitly (incl. hooks).
test/helpers/distance.test.ts Import Vitest APIs explicitly.
test/gpf/wfs-schema-catalog.test.ts Import Vitest APIs explicitly (incl. hooks).
test/gpf/urbanisme.test.ts Import Vitest APIs explicitly (incl. hooks/vi).
test/gpf/parcellaire-express.test.ts Import Vitest APIs explicitly (incl. hooks/vi).
test/gpf/geocode.test.ts Import Vitest APIs explicitly.
test/gpf/altitude.test.ts Import Vitest APIs explicitly.
test/gpf/adminexpress.test.ts Import Vitest APIs explicitly (incl. hooks/vi).
README.md Document typecheck commands and verify:fast behavior.
package.json Add typecheck:test and include it in verify:fast.
.github/workflows/npm-publish.yml Run verify:fast in release/publish workflow.
.github/workflows/node.js.yml Run verify:fast in CI workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tsconfig.test.json
Comment thread package.json
Comment thread test/integration/helpers/level1-assertions.ts
Comment thread test/integration/helpers/level1-assertions.ts
@esgn esgn merged commit 7617f16 into master May 5, 2026
7 checks passed
@esgn esgn deleted the 108-typecheck-test branch May 5, 2026 13:20
@esgn esgn restored the 108-typecheck-test branch May 5, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type-check test files

3 participants